home *** CD-ROM | disk | FTP | other *** search
/ Wonky Flux Batch 2019 02 / Wonky_Flux_Batch_2019-02.zip / Wonky Flux Batch 2019-02 / 106 - Proboard KEY Floppy - Must be in Drive 1.dsk / STAR.TREK.PRO5 / STAR.TREK.S < prev   
Text File  |  1989-08-03  |  6KB  |  213 lines

  1.  
  2. ; STAR TREK by Ken Rogers
  3.  
  4. ; Tested and supported on ProBOARD @ 805-239-4292
  5.  
  6. ; Version 1.5
  7.  
  8.  public computer
  9.  public torpedos
  10.  public shields
  11.  public show.file
  12.  
  13. Shields
  14.  on nocar goto termin
  15.  if nibble(16)<4 print "    shield control inoperative":linkdx$+"star","begin"
  16.  print"       energy available: "e+s" units."
  17.  input"       number of units to deploy to shields ";x
  18.  if x<0 or s=x then print       "< shields unchanged >":linkdx$+"star","begin"
  19.  if x<=e+s goto shie2
  20.  print"shield control reports:  this is not the federation treasury."
  21.  print"                          < shields unchanged >":linkdx$+"star","begin"
  22.  
  23. Shie2
  24.  e=e+s-x:s=x:print"     deflector room control report:"
  25.  print"                 shields now at "s" units per your command."
  26.  linkdx$+"star","begin"  
  27.  
  28. Torpedos
  29.  on nocar goto termin
  30.  if p<=0 print"    all photon torpedoes expended":linkdx$+"star","begin"
  31.  if nibble(14)<4 print"photon torpedo tubes are not operational":link dx$+"star","begin"
  32.  fr$="tor":input@2"photon torpedo course (0-359): ";b1
  33.  if b1=chr$(13) linkdx$+"star","begin"
  34.  if b1=360 b1=0
  35.  if b1>=0 and b1<360 goto torp2
  36.  print "ensign chekhov reports, `incorrect course data, sir!`"
  37.  link dx$+"star","begin"
  38.  
  39. Torp2
  40.  if (b1>=0) and (b1<=90) x2=b1*10/9:x1=b1*10/9-100
  41.  if (b1>90) and (b1<=180) x2= 100-(b1*10-900)/9: x1=(b1*10-900)/9
  42.  if (b1>180) and (b1<=270) x2= 200-b1*10/9: x1= 100-(b1*10-1800)/9
  43.  if (b1>270) and (b1<360) x2= (b1*10-2700)/9-100:x1=300-b1*10/9
  44.  x=s1:y=s2:e=e-2:p=p-1:y1=0:y2=0:print"tracking torpedo;":print"          ";
  45.  
  46. Torp3
  47.  y1=y1+x1:x3=(y1+x*100)/100
  48.  y2=y2+x2:y3=(y2+y*100)/100
  49.  if (x3<1) or (x3>8) goto missed
  50.  if (y3<1) or (y3>8) goto missed
  51.  
  52.  gosub backup:print"  ["y3","x3"]";:a$="   ":z2=y3:z1=x3:gosub cstring
  53.  if z3<>0 goto torp3
  54.  a$="<*>":z1=x3:z2=y3:gosub cstring:if z3=1 goto torp3
  55.  a$="+K+":z1=x3:z2=y3:gosub cstring:if z3=0 goto hit.star
  56.  print\"**** klingon destroyed ****":kg=kg-1:kt=kt-1
  57.  if kt<=0 link dx$+"star.main","congrats"
  58.  for i= 1to3:if x3=nibble(0+i) and y3=nibble(3+i) goto torp4
  59.  next:i=3
  60.  
  61. Torp4
  62.  i=3:next:nibble(6+i)=0:goto gone
  63.  
  64. Hit.star
  65.  a$=" * ":z1=x3:z2=y3:gosub cstring:if z3=0 goto hit.base
  66.  print\"star at "y3","x3" absorbed torpedo.":linkdx$+"star.main","shoot"
  67.  
  68. Hit.base
  69.  a$=">!<":z1=x3:z2=y3:gosub cstring:if z3=0 goto torpedos
  70.  print\"**** star base destroyed!!! ****":b3=b3-1:b9=b9-1
  71.  if b9>0 goto consider
  72.  print"that does it, captain!!  You are hereby relieved of command"
  73.  print" and sentenced to 99 stardates at hard labor on cygnus 12!!"
  74.  link dx$+"star.main","end.game"
  75.  
  76. Consider
  77.  print"starfleet command reviewing your record to consider court martial"
  78.  
  79. Gone
  80.  z1=x3:z2=y3:a$="   ":gosub astring
  81.  byte((8*q1-8)+q2)=kg*100+b3*10+s3
  82.  in=((8*q1-8)+q2):a$=str$(byte(in)+1000):a$=right$(a$,3)
  83.  s8=(q2*3-2)+(q1*24-24)
  84.  if s8=1 tr$=a$+right$(tr$,189):goto torp6
  85.  if s8>=190 tr$=left$(tr$,189)+a$:goto torp6
  86.  tr$=left$(tr$,s8-1)+a$+right$(tr$,190-s8)
  87.  
  88. Torp6
  89.  linkdx$+"star.main","shoot"
  90.  
  91. Missed
  92.  print\"     torpedo missed":linkdx$+"star.main","shoot"
  93.  
  94. Astring
  95.  s8=(z2*3-2)+(z1*24-24)
  96.  if s8=1 q$=a$+right$(q$,189):return
  97.  if s8>=190 q$=left$(q$,189)+a$:return
  98.  q$=left$(q$,s8-1)+a$+right$(q$,190-s8):return
  99.  
  100. Cstring
  101.  s8=((z2*3-2)+(z1*24-24)):z3=0
  102.  if mid$(q$,s8,3)<>a$ return
  103.  z3=1:return
  104.  
  105. Backup
  106.  print chr$(8,7);chr$(32,7);chr$(8,7);
  107.  return
  108.  
  109. Computer
  110.  on nocar goto termin
  111.  if nibble(17)<3 print\"Computer Disabled":linkdx$+"star","begin"
  112.  input@2\"Computer Active And Waiting Command ";j$
  113.  a=val(j$)
  114.  if j$="1" goto direction
  115.  if j$="2" goto gal.map
  116.  if j$="3" goto status
  117.  if j$="4" goto chart
  118.  if (j$="5" or j$="") link dx$+"star","begin"
  119.  
  120.  print\\"functions available from library-computer"
  121.  print\'
  122.  1 - direction calculator
  123.  2 - cumulative galactic record
  124.  3 - status report
  125.  4 - chart of quadrant names
  126.  5 - exit computer'
  127.  goto computer
  128.  
  129. Direction
  130.  print\"          direction calculator"
  131.  print\"you are in quadrant "q2","q1"    sector "s2","s1
  132.  print"enter the sector of the object you wish to find (x,y)"
  133.  input"x=";i
  134.  if i<1 or i>8 goto direction
  135.  input"y=";w1
  136.  if w1<1 or w1>8 goto direction
  137.  b6=s1:a=s2
  138.  x=i-a:y=b6-w1:ifx<0 goto direc4
  139.  if y<0 goto direc5
  140.  if x>0 goto direc1
  141.  if y=0 b1=270:goto direc2
  142.  
  143. Direc1
  144.  b1=90
  145.  
  146. Direc2
  147.  if y<=0 y=w1-b6
  148.  if x<=0 x=a-i
  149.  if y<=x goto direc3
  150.  print\"direction = ";:i=y-x:i=(i+y)*100:i=i/y:i=(i*45)/100:printb1-i
  151.  goto computer 
  152.  
  153. Direc3
  154.  print\"direction = ";:i=(((y*100)/x)*45)/100
  155.  print b1-i:goto computer
  156.  
  157. Direc4
  158.  if y>0 b1=360:print"b1="b1:goto direc6
  159.  if x<>0 b1=270:print"b1="b1:goto direc2
  160.  
  161. Direc5
  162.  b1=180
  163.  
  164. Direc6
  165.  if y<=0 y=w1-b6
  166.  if x<=0 x=a-i
  167.  if y>=x goto direc7
  168.  print\"direction = ";:i=x-y:i=(i+x)*100:i=i/x:i=(i*45)/100:print b1-i
  169.  goto computer
  170.  
  171. Direc7
  172.  print\"direction = ";:i=(((x*100)/y)*45)/100
  173.  print b1-i:goto computer
  174.  
  175. Gal.map
  176.  print\\"      computer record of galaxy"\
  177.  print"     1     2     3     4     5     6     7     8
  178.  o1$="   ----- ----- ----- ----- ----- ----- ----- -----":print o1$
  179.  for i=1 to 8:print"    ";:forj=1to8:print mid$(tr$,(i*24-24)+(j*3-2),3)"   ";
  180.  next:print\o1$:next:goto computer
  181.  
  182. Chart
  183.  f$=dx$+"star.chart"
  184.  setint(1):print\s$\:copy f$:setint("")
  185.  print"Press Return.... ";:get f$:print chr$(8)\:goto computer
  186.  
  187. Status
  188.  print\\"      status report"\:x$="":if kt>1 x$="s"
  189.  print"    klingon"x$" remaining:   "kt
  190.  x=(clock(2)-clock(1))/60:x$=right$("0"+str$(x),2)+" minutes"
  191.  print"    time remaining:       "x$:x$="":if b9>1 x$="s"
  192.  print"    starbase"x$" remaining:  "b9\\:goto computer
  193.  
  194. Show.file
  195.  on nocar goto termin
  196.  f$=dx$+"star.instr"
  197.  setint(1):print\s$\:open #1,f$:if mark(1) close #1:link dx$+"star","commands"
  198.  
  199. Showfl2
  200.  copy (20) #1
  201.  if (eof(1) or key(1)) setint(""):close #1:link dx$+"star","commands"
  202.  if not flag(35) goto showfl2
  203.  print "press [return] ";:get i$:if i$=chr$(13) print " ";
  204.  print chr$(8,16);chr$(32,16);chr$(8,16);
  205.  if i$=" " setint(""):close #1:link dx$+"star","commands"
  206.  setint(1):goto showfl2
  207.  
  208. Termin
  209.  linkdx$+"star.logon","termin"
  210.  
  211. ; EOF
  212.  
  213.